home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Turnbull China Bikeride
/
Turnbull China Bikeride - Disc 1.iso
/
ARGONET
/
PD
/
FILER
/
TARSRC.SPK
/
c
/
stat
< prev
next >
Wrap
Text File
|
1990-07-09
|
691b
|
37 lines
#include <stdlib.h>
#include "os.h"
#include "swis.h"
#include "stat.h"
int stat(char *FileName, struct stat *Buf)
{
os_filestr Blk;
Blk.action = 5;
Blk.name = FileName;
if (os_file(&Blk) != NULL)
return 1;
Buf->st_load_address = Blk.loadaddr;
Buf->st_exec_address = Blk.execaddr;
Buf->st_size = Blk.start;
Buf->st_attr = Blk.end;
Buf->st_type = Blk.action;
if (Buf->st_type == 0)
return 1;
return 0;
} /* stat */
void wstat(char *FileName, struct stat *Buf)
{
os_filestr Blk;
Blk.action = 1;
Blk.name = FileName;
Blk.loadaddr = Buf->st_load_address;
Blk.execaddr = Buf->st_exec_address;
Blk.end = Buf->st_attr;
os_file(&Blk);
} /* wstat */